package com.toycloud.common.excel.converter;

import com.alibaba.excel.converters.Converter;
import com.alibaba.excel.metadata.GlobalConfiguration;
import com.alibaba.excel.metadata.data.WriteCellData;
import com.alibaba.excel.metadata.property.ExcelContentProperty;

public class NowStatusConverter implements Converter<String> {

    @Override
    public Class<String> supportJavaTypeKey() {
        return String.class;
    }

    @Override
    public WriteCellData<?> convertToExcelData(String value, ExcelContentProperty contentProperty, GlobalConfiguration globalConfiguration) {
        if ("0".equals(value)) {
            return new WriteCellData<>("需求录入");
        } else if ("1".equals(value)) {
            return new WriteCellData<>("需求筛选");
        } else if ("2".equals(value)) {
            return new WriteCellData<>("需求调研");
        } else if ("3".equals(value)) {
            return new WriteCellData<>("需求分析");
        } else if ("4".equals(value)) {
            return new WriteCellData<>("需求评审");
        } else if ("5".equals(value)) {
            return new WriteCellData<>("产品设计");
        } else if ("6".equals(value)) {
            return new WriteCellData<>("产品开发");
        } else if ("7".equals(value)) {
            return new WriteCellData<>("产品发布");
        } else if ("8".equals(value)) {
            return new WriteCellData<>("上市验证");
        } else {
            return new WriteCellData<>(value);  // 默认保持原值
        }
    }
}

